from math import pow

# 100-999
for i in range(100, 1000):
    i_str = str(i)

    bai = int(i_str[0])
    shi = int(i_str[1])
    ge = int(i_str[2])
    
    if i == pow(bai, 3) + pow(shi, 3) + pow(ge, 3):
        print(i)
